package com.example.AOPTest.staticLib;

import com.example.AOPTest.staticLib.impl.RealSubject;

/**
 * description: Proxy <br>
 * date: 2021/4/23 11:02 <br>
 *
 * @author: ZhangYixin <br>
 * version: 1.0 <br>
 */
public class Proxys implements Subject {

    private RealSubject realSubject;

    public Proxys(RealSubject realSubject) {
        this.realSubject = realSubject;
    }

    @Override
    public void request() {
        // 执行代理逻辑
        System.out.println("卖房前");

        // 执行代理目标
        realSubject.request();

        // 执行代理逻辑
        System.out.println("卖房后");
    }
}
